//package com.kerraway.config;
//
//import io.shardingsphere.shardingjdbc.jdbc.core.datasource.ShardingDataSource;
//import org.flywaydb.core.Flyway;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.annotation.Resource;
//
///**
// * @author 小柯
// * @date 2018/9/5
// */
//@Configuration
//public class FlywayConfig {
//
//  @Resource
//  private ShardingDataSource dataSource;
//
//  @Bean
//  public Flyway flyway() {
//    Flyway flyway = new Flyway();
//    flyway.setDataSource(dataSource.getDataSourceMap().get("all_tests"));
//    flyway.setBaselineOnMigrate(true);
//    flyway.repair();
//    flyway.migrate();
//    return flyway;
//  }
//
//}
